<template>
  <div
    class="page-detail"
    :loading="loading"
  >
    <base-breadcrumb>
      <title-name
        size="24"
        title="物料查询"
      />
      <a-card>
        <title-name title="基本信息" />
        <a-form-model :model="formData">
          <a-row>
            <a-col span="8">
              <!-- 编辑时才显示-->
              <a-form-model-item label="物料名称">
                <BaseInput
                  v-model="formData.name"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="物料编码">
                <BaseInput
                  v-model="formData.code"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="规格型号">
                <BaseInput
                  v-model="formData.specificationModel"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="计量单位">
                <BaseInput
                  v-model="formData.unit"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="云筑单位">
                <BaseInput
                  v-model="formData.newUnit"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="所属目录名称">
                <BaseInput
                  v-model="formData.catalogName"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="所属目录编码">
                <BaseInput
                  v-model="formData.catalogCode"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="状态">
                <BaseInput
                  v-model="formData.commonStatusStr"
                  disabled
                />
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-form-model>
      </a-card>

      <a-card>
        <title-name title="属性值" />
        <a-table
          :columns="propertyColumns"
          :data-source="formData.properties"
        />
      </a-card>

      <div class="pub-header-btn page-btn-right-top">
        <a-button @click="$close">
          关闭
        </a-button>
      </div>
    </base-breadcrumb>
  </div>
</template>

<script>

export default {
	name:'a'+Date.now(),
    data() {
        return {
            loading: false,
            formData: this.$route.query.row,
            propertyColumns: [
                {
                    title: '属性值编号',
                    dataIndex: 'propertyValueSysNo'
                },
                {
                    title: '属性值名称',
                    dataIndex: 'propertyName'
                },
                {
                    title: '属性值内容',
                    dataIndex: 'propertyValueDesc'
                }
            ],
        }
    },
    mounted: function() {

    },
    methods: {}
}
</script>

<style lang="less" scoped>
.masterPlanAdd {
    .rebarPlanTabel {
        background: #fff;
        padding: 20px;
        margin: 20px 0;
    }
}
</style>
